package red.stu.mc.mod.codeblock.inventory;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import red.stu.mc.mod.codeblock.CodeBlockMod;
import red.stu.mc.mod.codeblock.client.gui.GuiContainerCodeBlock;

public class GuiElementLoader implements IGuiHandler {

	public static final int GUI_Block_CodeBlock = 1;

	public GuiElementLoader() {
		NetworkRegistry.INSTANCE.registerGuiHandler(CodeBlockMod.instance, this);
	}

	@Override
	public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
		switch (ID) {
		case GUI_Block_CodeBlock:
			return new ContainerCodeBlock();
		default:
			return null;
		}
	}

	@Override
	public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
		switch (ID) {
		case GUI_Block_CodeBlock:
			return new GuiContainerCodeBlock(new ContainerCodeBlock());
		default:
			return null;
		}
	}

}
